package com.example.activity_service.dao;

import com.example.activity_service.vo.Draw;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Prizesdao {
    @Select ("select * from hongbao order by id desc limit 6")
    @Results({
            @Result(property = "users",column = "users"),
            @Result(property = "redenvelopes",column = "redenvelopes")
    })
    List<Draw> draws();

    @Insert ("insert into hongbao(users,redenvelopes,parvalue,collectiontime) values(#{users},#{redenvelopes},#{parvalue},now())")
    int recharge(int users,String redenvelopes,Double parvalue);
}
